//-----------------------------------------------------------
//  Main Character Actor for "War Factory" Game
//  Unus
//-----------------------------------------------------------
class EnyaraPawn extends xPawn;

var name LevGunAnim;
var name FireballAnim;
var name ElementAnim;

function PostBeginPlay()
{
 super.PostBeginPlay();

 GiveWeapon("Enyara.ElementShield");
 GiveWeapon("Enyara.boltSpell");
}

/* PointOfView()
called by controller when possessing this pawn
false = 1st person, true = 3rd person
*/
simulated function bool PointOfView()
{
  //default camera to third person
    return true;
}

simulated function StartFiring(bool bHeavy, bool bRapid)
{
    local name FireAnim;

    if ( HasUDamage() && (Level.TimeSeconds - LastUDamageSoundTime > 0.25) )
    {
        LastUDamageSoundTime = Level.TimeSeconds;
        PlaySound(UDamageSound, SLOT_None, 1.5*TransientSoundVolume,,700);
    }

    if (Physics == PHYS_Swimming)
        return;

    if (LevGun(Weapon) != none)
    {
      FireAnim = LevGunAnim;
    }
    else if (boltSpell(Weapon) != none)
    {
      FireAnim = FireballAnim;
    }
    else
    {
      FireAnim = ElementAnim;
    }

    AnimBlendParams(1, 1.0, 0.0, 0.2, FireRootBone);

    if (bRapid)
    {
        if (FireState != FS_Looping)
        {
            LoopAnim(FireAnim,, 0.0, 1);
            FireState = FS_Looping;
        }
    }
    else
    {
        PlayAnim(FireAnim,, 0.0, 1);
        FireState = FS_PlayOnce;
    }

    IdleTime = Level.TimeSeconds;
}

defaultproperties
{
     RequiredEquipment(0)="Enyara.LevGun"
     //RequiredEquipment(1)="Enyara.boltSpell"
     //RequiredEquipment(2)="Enyara.telekGun"
     LandMovementState="PlayerMousing"
     LevGunAnim="PThrust"
     FireballAnim="gesture_halt"
     ElementAnim="AssSmack"

     SoundGroupClass=Class'XGame.xMercFemaleSoundGroup'
     Skins(0)=Texture'PlayerSkins.MercFemaleCBodyA_0'
     Skins(1)=Texture'PlayerTextures.EnyaraHead'
     Mesh=SkeletalMesh'HumanFemaleA.MercFemaleB'
}
